
//		REGIONAL DIFFERENCES IN SUPPORT FOR SECESSION AMONG MEMBERS OF THE IGBO ETHNIC GROUP IN NIGERIA

										*Daniel Tuki*


* This study is based on data from Rounds 7 and 9 of the Afrobarometer survey, conducted in 2017 and 2022, respectively. To access the data and survey questionairre vist: https://www.afrobarometer.org/

* Below I present the codes used to execute the regression models and to obtain the summary statistics, using the pooled dataset that has been provided. After the regression codes, I present the codes used to sort the raw Afrobarometer dataset that I used to develope the pooled dataset for the main regression models. I also present the codes required to identify Biafra-related conflicts using data from the Armed Conflict Location and Event Data Project (ACLED).		

										
										********************************************************************************
*								DESCRIPTIVE STATISTICS
********************************************************************************

// 	Table 1: Descriptive Statistics for Igbo respondents

summ secede eth_host eastern_region age gender deprivation night_lga inf_mor_lga if igbo == 1




********************************************************************************
*								REGRESSION MODELS
********************************************************************************
// 	Table 2: Ordered logit models regressing support for secession on residence in Biafran territory 

* Model 1: Baseline
ologit secede eastern_region, vce(robust), if igbo == 1
* To obtain the AIC statistic
estat ic

* Model 2: Adding demographic control variables
ologit secede eastern_region age gender deprivation, vce(robust), if igbo == 1
* To obtain the AIC statistic
estat ic

* model 3: Adding objective control variables
ologit secede eastern_region age gender deprivation night_lga inf_mor_lga, vce(robust), if igbo == 1
* To obtain the AIC statistic
estat ic

* model 4: Adding year Fixed effects
ologit secede eastern_region age gender deprivation night_lga inf_mor_lga i.year, vce(robust), if igbo == 1
* To obtain the AIC statistic
estat ic



//	Figure 5: Predicted probabilities showing the magnitude of the association between residence in the Biafran territory and support for secession 

* Model 1 in Table 2: Baseline
ologit secede eastern_region, vce(robust), if igbo == 1
margins, dydx(eastern_region)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (biafra_secede, replace)




// 	Table 3: Ordered logit models regressing hostility towards ethnic outgroup members on residence in Biafra territory 

* Model 1: Baseline
ologit eth_host eastern_region, vce(robust), if igbo == 1
* To obtain the AIC statistic
estat ic

* Model 2: Adding demographic control variables
ologit eth_host eastern_region age gender deprivation, vce(robust), if igbo == 1
* To obtain the AIC statistic
estat ic

* model 3: Adding objective variables
ologit eth_host eastern_region age gender deprivation night_lga inf_mor_lga, vce(robust), if igbo == 1
* To obtain the AIC statistic
estat ic

* model 4: Adding year Fixed effects
ologit eth_host eastern_region age gender deprivation night_lga inf_mor_lga i.year, vce(robust), if igbo == 1
* To obtain the AIC statistic
estat ic


//	Figure 6: Predicted probabilities showing the magnitude of the association between residence in Biafran territory and willingness to have neighbors of a different ethnic group 

* Model 1 in Table 3: Baseline
ologit eth_host eastern_region, vce(robust), if igbo == 1
margins, dydx(eastern_region)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (biafra_hostile, replace)




									***
									
********************************************************************************
// The codes below were used to sort the raw Afrobarometer Round 7 and Round 9 data, that were pooled together for the analysis. To access the raw Afrobarometer dataset visit: https://www.afrobarometer.org/


********************************************************************************
*									ROUND 7 DATA (2017)
********************************************************************************
* The variable names are in brackets, while the variable number in the survey instrument is in square brackets. 

//					DEPENDENT VARIABLES
			
// Support secession (secede) [Based on Q80B]: Measures support for secession
*To treat the "Don't know" and "Refused to answer" responses as missing: 
codebook Q80B
replace Q80B = . if Q80B > 5
*To invert the responses so higher values denote higher support for secession: 
gen secede = 6 - Q80B


* Ethnic hostility (eth_host) [Q87B]: Measures respondents' williningness to have people of a different ethnic group as neighbors. 
* To treat "don't know" and "refused to answer" responses as missing: 
codebook Q87B
replace Q87B = . if Q87B > 5
* To generate the variable and invert the ordinal values so higher ones denote greater hostility: 
gen eth_host = 6 - Q87B



///					EXPLANATORY VARIABLES

// Residence in Biafra (eastern_region) [REGION]: This is a dummy variable that is coded as 1 if a respondent lives in Biafran territory (i.e., a state in Eastern Nigeria) and 0 otherise. 

tab REGION
tab REGION, nolabel

gen eastern_region = 0
replace eastern_region = 1 if REGION == 620
replace eastern_region = 1 if REGION == 622
replace eastern_region = 1 if REGION == 623
replace eastern_region = 1 if REGION == 625
replace eastern_region = 1 if REGION == 628
replace eastern_region = 1 if REGION == 630
replace eastern_region = 1 if REGION == 633
replace eastern_region = 1 if REGION == 636
replace eastern_region = 1 if REGION == 652



///					CONTROL VARIABLES

// Deprivation index (deprivation) [Based on Q8A Q8B Q8C Q8D]: This is an additive indicator that measures the frequency with which respondents and their household members have gone without basics like food, water, medicine, and fuel. 

* Food (food)
codebook Q8A
gen food = Q8A
**To treat "Don't know" responses as missing (same for other factors)
replace food = . if food > 4

* Water (water)
codebook Q8B
gen water = Q8B
replace water = . if water > 4

* Medicine (medicine)
codebook Q8C
gen medicine = Q8C
replace medicine = . if medicine > 4

*Fuel (fuel)
codebook Q8D
gen fuel = Q8D
replace fuel = . if fuel > 4

*To sum the four items:  
gen deprivation = food + water + medicine + fuel

*To check the internal reliability of these 4 factors (Cronbbach Alpha 0.78): 
alpha food water medicine fuel

			
// Age (age): 
*(Based on q1 in Afrobarometer questionnaire)
tab Q1, 
tab Q1, nolabel
gen age = Q1
*To treat the "don't know" response as missing "i.e., value of 998"
replace age = . if age == 998


// Gender (gender) [Based on Q101]: This variable is coded as Male = 1 and Female = 0. 
*To make this a dummy variable with Male = 1, and female = 0
codebook Q101
gen gender = Q101
replace gender = 0 if gender == 2


//	Ethnic group [Based on Q84]: I used this variablke to develop dummy variables for the four major ethnic categories - i.e., Hausa/Fulani, Yoruba, Igbo, and ethnic minorities. 
codebook Q84
tab Q84
tab Q84, nolabel

* Igbo (igbo)
gen igbo = 0
replace igbo = 1 if Q84 == 621
*To account for the Igbo respondent listed under "Q84other" as "IBO"
replace igbo = 1 if Q84OTHER == "IBO"

* Hausa/Fulani (hausa_fulani)
gen hausa_fulani = 0
*To account for the Hausa:
replace hausa_fulani = 1 if Q84 == 620
*To account for the Fulani: 
replace hausa_fulani = 1 if Q84 == 625

*Yoruba (yoruba):
gen yoruba = 0 
replace yoruba = 1 if Q84 == 622

// Ethnic minorities (ethnic_others):  This consists of respondents who are neither Hausa/Fulani, Yoruba, nor Igbo:
gen other_ethnic = 1
*To code members of the 3 major ethnic groups as 0:
replace other_ethnic = 0 if hausa_fulani == 1
replace other_ethnic = 0 if yoruba == 1
replace other_ethnic = 0 if igbo == 1


// Nighttime light (night_lga): This variable measures the mean annual nighttime light in the local government area (LGA) (i.e., municipality) where respondents reside. I developed it using QGIS software. I discuss this variable in more detail in Section 2.1.3 in the manuscript. 


// Infant mortality (inf_mor_lga): This variable measures the number of children under the age of one per 1,000 live births, who died in 2015 within the LGA where respondents reside. I also developed this variable using QGIS software and discuss it in detail in Section 2.1.3 in the manuscript. 


// Year (year): This is an indicator for the year in whcih the survey was conducted.
gen year = 2017


// Round (round): This indicates the survey round. 
gen round = 7




********************************************************************************
*							ROUND 9 DATA (2022)							
********************************************************************************
* The variable names are in brackets, while the variable number in the survey instrument is in square brackets. 

//					DEPENDENT VARIABLE
			
// Support secession (secede) [Q80B_NIG]:
codebook Q80B
gen secede = Q80B_NIG
* To code "don't know" responses as missing: 
replace secede = . if Q80B_NIG > 5


* Ethnic hostility (eth_host) [Q87B]: Measures respondents' williningness to have people of a different ethnic group as neighbors. 
* To treat "don't know" and "refused to answer" responses as missing: 
codebook Q87B
replace Q87B = . if Q87B > 5
* To generate the variable and invert the ordinal values so higher ones denote greater hostility: 
gen eth_host = 6 - Q87B



//					EXPLANATORY VARIABLES
			
// Residence in Biafra (eastern_region) [REGION]: This is a dummy variable that is coded as 1 if a respondent lives in Biafran territory (i.e., a state in Eastern Nigeria) and 0 otherise. 

tab REGION
tab REGION, nolabel

gen eastern_region = 0
replace eastern_region = 1 if REGION == 620
replace eastern_region = 1 if REGION == 622
replace eastern_region = 1 if REGION == 623
replace eastern_region = 1 if REGION == 625
replace eastern_region = 1 if REGION == 628
replace eastern_region = 1 if REGION == 630
replace eastern_region = 1 if REGION == 633
replace eastern_region = 1 if REGION == 636
replace eastern_region = 1 if REGION == 652



///					CONTROL VARIABLES

// Economic deprivation (deprivation) [Based on Q6A Q6B Q6C Q6D]: 

*Food (food)
codebook Q6A
gen food = Q6A
*To treat "Don't know" responses as missing (same for other factors)
replace food = . if food > 4
*Measures the frequency with which the household has gone without food

*Water (water)
codebook Q6B
gen water = Q6B
replace water = . if water > 4
*Measures the frequency with which the household has gone without water for use at home. 

*Medicine (medicine)
codebook Q6C
gen medicine = Q6C
replace medicine = . if medicine > 4
*Measures the frequency with which the household has gone without medicine when sick

*Fuel (fuel)
codebook Q6C
gen fuel = Q6D
replace fuel = . if fuel > 4
*Measures the frequency with which the household has gone without fuel to cook food.

*To sum the four items:  
gen deprivation = food + water + medicine + fuel

*To check the internal reliability of these 4 items (Cronbbach Alpha 0.81): 
alpha food water medicine fuel

		
// Age (age) [Based on Q1]: 
tab Q1
gen age = Q1


// Gender (gender) [Based on q101]: Coded as Male = 1 and Female = 0. 
*To make this a dummy variable with Male = 1, and female = 0
codebook Q101
gen gender = Q101
* To code Female as 0 instead of 2:
replace gender = 0 if gender == 2


//	Ethnic group [Based on Q84A]: I used this variablke to develop dummy variables for the four major ethnic categories - i.e., Hausa/Fulani, Yoruba, Igbo, and ethnic minorities. 
codebook Q84A
tab Q84A
tab Q84A, nolabel

* Igbo (igbo)
gen igbo = 0
replace igbo = 1 if Q84A == 621


* Hausa/Fulani (hausa_fulani)
gen hausa_fulani = 0
*To account for the Hausa:
replace hausa_fulani = 1 if Q84A == 620
*To account for the Fulani: 
replace hausa_fulani = 1 if Q84A == 625
 

* Yoruba (yoruba):
gen yoruba = 0 
replace yoruba = 1 if Q84A == 622


// Ethnic minorities (ethnic_others): This consists of respondents who are neither Hausa/Fulani, Yoruba, nor Igbo:
gen other_ethnic = 1
*To code members of the 3 major ethnic groups as 0:
replace other_ethnic = 0 if hausa_fulani == 1
replace other_ethnic = 0 if yoruba == 1
replace other_ethnic = 0 if igbo == 1


// Nighttime light (night_lga): This variable measures the mean annual nighttime light in the local government area (LGA) (i.e., municipality) where respondents reside. I developed it using QGIS software because the raw data is in raster format. I discuss this variable in more detail in Section 2.1.3 in the manuscript. 


// Infant mortality (inf_mor_lga): This variable measures the number of children under the age of one per 1,000 live births, who died in 2015 within the LGA where respondents reside. I also developed this variable using QGIS software and discuss it in detail in Section 2.1.3 in the manuscript. 


// Year (year) this is an indicator for the year in whcih the survey was conducted.
gen year = 2022


// Round (round): This indicates the survey round. 
gen round = 9



********************************************************************************
*							Codes used to sort the ACLED dataset							
********************************************************************************
* In the introduction, I mentioned some stylized facts on the annual trend in conflict incidents involving neo-Biafra groups. This information is based on data from the Armed Conflict Location and Event Data Project (ACLED). Below I provide the codes used to identify the Biafra-related incidents. 

* First download the ACLED dataset and upload it into STATA. The access the data visit: https://acleddata.com/

* To keep only events that occurred in Nigeria: 
keep if country == "Nigeria"


* To identify Biafra-related actors, I identify events where at least one of the actors or associated actors' names contains the word "Biafra":

gen biafra_1 = strmatch(actor1, "*Biafra*")
gen biafra_11 = strmatch(assoc_actor_1, "*Biafra*")
gen biafra_2 = strmatch(actor2, "*Biafra")
gen biafra_22 = strmatch(assoc_actor_2, "*Biafra*")

*To generate a variable "incident_biafra" where observations greater than 1 imply that the incident involves at least one Biafra-related actor:
gen incident_biafra = biafra_1 + biafra_11 + biafra_2 + biafra_22

*To drop incidents that do not involve a Biafra-related actor - leaving only those involving a Biafra-related actor: 
drop if incident_biafra == 0

* To determine the annual tend in Biafra-related conflicts:
tab year

* To deermine the total fatalities per year: 
collapse (sum) fatalities, by(year)
* To see the total fatalities associated with the respective years: 
bro
